# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Bjorn Lindeijer <bjorn lindeijer nl>
# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: Jesse McClure <jesse [dot] mcclure [at] umassmed [dot] edu>

pkgname=manaplus
pkgver=2.1.3.17
pkgrel=1
pkgdesc="Free OpenSource 2D MMORPG client for Evol Online, The mana world and similar servers"
arch=('loong64' 'x86_64')
url="https://manaplus.org/"
license=('GPL')
depends=('glu' 'libxml2' 'physfs' 'sdl_image' 'sdl_mixer' 'sdl_net' 'sdl_ttf' 'sdl_gfx' 'curl')
makedepends=('mesa')
replaces=('tmw')
source=($pkgname-$pkgver.tar.gz::https://github.com/ManaPlus/ManaPlus/archive/v$pkgver.tar.gz)
sha256sums=('5506a283e4df6ea96750347dc1b67d8f71421acff8070a13a15c00960b16c9f7')

prepare() {
  cd ManaPlus-$pkgver

  autoreconf -i
}

build() {
  cd ManaPlus-$pkgver

  ./configure --prefix=/usr
  make
}

package() {
  cd ManaPlus-$pkgver

  make DESTDIR="${pkgdir}" install
}
